home *** CD-ROM | disk | FTP | other *** search
- class com.ndimedia.containers.View extends com.ndimedia.display.Sprite
- {
- var m_aChildren;
- var m_bAnimated;
- var m_x;
- var m_y;
- var m_intro;
- var m_outro;
- function View(scope, d)
- {
- super(scope,d);
- this.m_aChildren = new Array();
- this.m_bAnimated = false;
- this.setPosition(0,0);
- this.hide();
- }
- function addChild(s)
- {
- this.m_aChildren.push(s);
- }
- function get children()
- {
- return this.m_aChildren;
- }
- function repaint()
- {
- }
- function setPosition(x, y)
- {
- this.m_x = x;
- this.m_y = y;
- }
- function hide()
- {
- this.graphics._x = 5000;
- }
- function show()
- {
- this.graphics._x = this.m_x;
- this.graphics._y = this.m_y;
- }
- function getPosition()
- {
- return new com.ndimedia.math.alg.Point(this.m_x,this.m_y);
- }
- function getSize()
- {
- return new com.ndimedia.math.geom.Rect(this.graphics._width,this.graphics._height);
- }
- function get animated()
- {
- return this.m_bAnimated;
- }
- function setAnims(intro, outro)
- {
- this.m_intro = intro;
- this.m_outro = outro;
- this.m_bAnimated = true;
- }
- function toString()
- {
- return "View";
- }
- }
-